package math;

import java.util.Arrays;

public class Random {

	private final static java.util.Random rnd = new java.util.Random();
	
	public static int getRandom(int range) {
		return rnd.nextInt(range);
	}
	
	public static int getRandom1(int range) {
		return Math.abs(rnd.nextInt()) % range;
	}
	
	public static void main(String[] args) {
		int n = 4 * (Integer.MAX_VALUE / 5);
		int lowNum = 0, loop = 1000000;
		for(int i = 0 ; i < loop; i++) {
			if( getRandom1(n)< n / 2 )
				lowNum ++;
		}
		System.out.println(lowNum);
		System.out.println(Integer.MIN_VALUE < 0);
		System.out.println(Math.abs(Integer.MIN_VALUE));
		System.out.println(new String[]{"l","i","n"});
		System.out.println(Arrays.asList(new String[]{"l","i","n"}));
		
	}
}
